package method;

import java.net.SocketOption;
import java.util.Arrays;

public class MethodDemo1 {
    public static void main(String[] args) {
        //掌握方法的调用
        int sum = getSum(10,20);
        System.out.println(sum);

        System.out.println("---------------");

        int sum2 = getSum(100,200);
        System.out.println(sum2);
        System.out.println("---------------");

        printHello();
    }
    //定义一个方法，求任意两个整数的和并返回
    public static int getSum(int a,int b){
        return a+b;
    }
    //需求：打印三行HelloWrold，不要返回值和参数
    public static void printHello(){
        System.out.println("HelloWorld");
        System.out.println("HelloWorld");
        System.out.println("HelloWorld");
    }
}
